﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="searchPage.aspx.cs" Inherits="LibrarySystem.WebForm5" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">
    <asp:DataPager ID="DataPager1" runat="server" PagedControlID="searchResList" OnPreRender="DataPager_PreRender">
        <Fields>
        <asp:NextPreviousPagerField ButtonType="Link" LastPageText="<<" PreviousPageText="<" ShowPreviousPageButton="True" FirstPageText="&lt;&lt;" ShowFirstPageButton="True" ShowNextPageButton="False" />
             <asp:NumericPagerField ButtonType="Link" ButtonCount="10" /> 
            <asp:NextPreviousPagerField ButtonType="Link" FirstPageText="" NextPageText=">" ShowNextPageButton="True" LastPageText="&gt;&gt;" ShowLastPageButton="True" ShowPreviousPageButton="False" />            
            </Fields>
  </asp:DataPager>

    <asp:Label ID="searchResCount" runat="server"></asp:Label>
    <asp:ListView ID="searchResList" runat="server" OnDataBound="searchResList_DataBound">
        <LayoutTemplate> 
             <tbody> <asp:PlaceHolder runat="server" ID="itemPlaceholder" /> </tbody>
        </LayoutTemplate>
        <ItemTemplate>
            <asp:LinkButton  runat="server" OnCommand="listItem_Clicked" CommandName='<%#Eval("ISBN")%>'>
                <table id="bookTable"> <tr><td id="bookTitle"><%# Eval("Title") %></td></tr> <tr><td id="bookAuthor"><%# Eval("Author") %></td></tr> <tr><td id="bookISBN">ISBN: <%# Eval("ISBN") %></td></tr></table>
           
            </asp:LinkButton>

            </ItemTemplate>
        
    </asp:ListView>
    
        
  <asp:DataPager ID="DataPager2" runat="server" PagedControlID="searchResList" OnPreRender="DataPager_PreRender" >
        <Fields>
        <asp:NextPreviousPagerField ButtonType="Link" LastPageText="<<" PreviousPageText="<" ShowPreviousPageButton="True" FirstPageText="&lt;&lt;" ShowFirstPageButton="True" ShowNextPageButton="False" />
             <asp:NumericPagerField ButtonType="Link" ButtonCount="10" /> 
            <asp:NextPreviousPagerField ButtonType="Link" FirstPageText="" NextPageText=">" ShowNextPageButton="True" LastPageText="&gt;&gt;" ShowLastPageButton="True" ShowPreviousPageButton="False" />            
            </Fields>
  </asp:DataPager>
</asp:Content>
